Optimal. Leaf size=216 \[ \frac {b^2 \left (6 a^2+4 a b+b^2\right ) \tan ^7(c+d x)}{7 d}-\frac {b^2 \left (6 a^2+4 a b+b^2\right ) \tan ^5(c+d x)}{5 d}+\frac {b (2 a+b) \left (2 a^2+2 a b+b^2\right ) \tan ^3(c+d x)}{3 d}-\frac {b (2 a+b) \left (2 a^2+2 a b+b^2\right ) \tan (c+d x)}{d}+\frac {b^3 (4 a+b) \tan ^{11}(c+d x)}{11 d}-\frac {b^3 (4 a+b) \tan ^9(c+d x)}{9 d}+x (a+b)^4+\frac {b^4 \tan ^{15}(c+d x)}{15 d}-\frac {b^4 \tan ^{13}(c+d x)}{13 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.13, antiderivative size = 216, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {3661, 1154, 203} \[ \frac {b^2 \left (6 a^2+4 a b+b^2\right ) \tan ^7(c+d x)}{7 d}-\frac {b^2 \left (6 a^2+4 a b+b^2\right ) \tan ^5(c+d x)}{5 d}+\frac {b (2 a+b) \left (2 a^2+2 a b+b^2\right ) \tan ^3(c+d x)}{3 d}-\frac {b (2 a+b) \left (2 a^2+2 a b+b^2\right ) \tan (c+d x)}{d}+\frac {b^3 (4 a+b) \tan ^{11}(c+d x)}{11 d}-\frac {b^3 (4 a+b) \tan ^9(c+d x)}{9 d}+x (a+b)^4+\frac {b^4 \tan ^{15}(c+d x)}{15 d}-\frac {b^4 \tan ^{13}(c+d x)}{13 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 203
Rule 1154
Rule 3661
Rubi steps
\begin {align*} \int \left (a+b \tan ^4(c+d x)\right )^4 \, dx &=\frac {\operatorname {Subst}\left (\int \frac {\left (a+b x^4\right )^4}{1+x^2} \, dx,x,\tan (c+d x)\right )}{d}\\ &=\frac {\operatorname {Subst}\left (\int \left (-b (2 a+b) \left (2 a^2+2 a b+b^2\right )+b (2 a+b) \left (2 a^2+2 a b+b^2\right ) x^2-b^2 \left (6 a^2+4 a b+b^2\right ) x^4+b^2 \left (6 a^2+4 a b+b^2\right ) x^6-b^3 (4 a+b) x^8+b^3 (4 a+b) x^{10}-b^4 x^{12}+b^4 x^{14}+\frac {(a+b)^4}{1+x^2}\right ) \, dx,x,\tan (c+d x)\right )}{d}\\ &=-\frac {b (2 a+b) \left (2 a^2+2 a b+b^2\right ) \tan (c+d x)}{d}+\frac {b (2 a+b) \left (2 a^2+2 a b+b^2\right ) \tan ^3(c+d x)}{3 d}-\frac {b^2 \left (6 a^2+4 a b+b^2\right ) \tan ^5(c+d x)}{5 d}+\frac {b^2 \left (6 a^2+4 a b+b^2\right ) \tan ^7(c+d x)}{7 d}-\frac {b^3 (4 a+b) \tan ^9(c+d x)}{9 d}+\frac {b^3 (4 a+b) \tan ^{11}(c+d x)}{11 d}-\frac {b^4 \tan ^{13}(c+d x)}{13 d}+\frac {b^4 \tan ^{15}(c+d x)}{15 d}+\frac {(a+b)^4 \operatorname {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\tan (c+d x)\right )}{d}\\ &=(a+b)^4 x-\frac {b (2 a+b) \left (2 a^2+2 a b+b^2\right ) \tan (c+d x)}{d}+\frac {b (2 a+b) \left (2 a^2+2 a b+b^2\right ) \tan ^3(c+d x)}{3 d}-\frac {b^2 \left (6 a^2+4 a b+b^2\right ) \tan ^5(c+d x)}{5 d}+\frac {b^2 \left (6 a^2+4 a b+b^2\right ) \tan ^7(c+d x)}{7 d}-\frac {b^3 (4 a+b) \tan ^9(c+d x)}{9 d}+\frac {b^3 (4 a+b) \tan ^{11}(c+d x)}{11 d}-\frac {b^4 \tan ^{13}(c+d x)}{13 d}+\frac {b^4 \tan ^{15}(c+d x)}{15 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 5.38, size = 196, normalized size = 0.91 \[ \frac {b \tan (c+d x) \left (6435 b \left (6 a^2+4 a b+b^2\right ) \tan ^6(c+d x)-9009 b \left (6 a^2+4 a b+b^2\right ) \tan ^4(c+d x)+15015 \left (4 a^3+6 a^2 b+4 a b^2+b^3\right ) \tan ^2(c+d x)-45045 \left (4 a^3+6 a^2 b+4 a b^2+b^3\right )+4095 b^2 (4 a+b) \tan ^{10}(c+d x)-5005 b^2 (4 a+b) \tan ^8(c+d x)+3003 b^3 \tan ^{14}(c+d x)-3465 b^3 \tan ^{12}(c+d x)\right )}{45045 d}+\frac {(a+b)^4 \tan ^{-1}(\tan (c+d x))}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.68, size = 225, normalized size = 1.04 \[ \frac {3003 \, b^{4} \tan \left (d x + c\right )^{15} - 3465 \, b^{4} \tan \left (d x + c\right )^{13} + 4095 \, {\left (4 \, a b^{3} + b^{4}\right )} \tan \left (d x + c\right )^{11} - 5005 \, {\left (4 \, a b^{3} + b^{4}\right )} \tan \left (d x + c\right )^{9} + 6435 \, {\left (6 \, a^{2} b^{2} + 4 \, a b^{3} + b^{4}\right )} \tan \left (d x + c\right )^{7} - 9009 \, {\left (6 \, a^{2} b^{2} + 4 \, a b^{3} + b^{4}\right )} \tan \left (d x + c\right )^{5} + 15015 \, {\left (4 \, a^{3} b + 6 \, a^{2} b^{2} + 4 \, a b^{3} + b^{4}\right )} \tan \left (d x + c\right )^{3} + 45045 \, {\left (a^{4} + 4 \, a^{3} b + 6 \, a^{2} b^{2} + 4 \, a b^{3} + b^{4}\right )} d x - 45045 \, {\left (4 \, a^{3} b + 6 \, a^{2} b^{2} + 4 \, a b^{3} + b^{4}\right )} \tan \left (d x + c\right )}{45045 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.03, size = 412, normalized size = 1.91 \[ -\frac {b^{4} \left (\tan ^{9}\left (d x +c \right )\right )}{9 d}+\frac {4 \left (\tan ^{11}\left (d x +c \right )\right ) a \,b^{3}}{11 d}-\frac {6 \left (\tan ^{5}\left (d x +c \right )\right ) a^{2} b^{2}}{5 d}+\frac {2 \left (\tan ^{3}\left (d x +c \right )\right ) a^{2} b^{2}}{d}+\frac {4 \left (\tan ^{7}\left (d x +c \right )\right ) a \,b^{3}}{7 d}+\frac {6 \left (\tan ^{7}\left (d x +c \right )\right ) a^{2} b^{2}}{7 d}-\frac {4 \left (\tan ^{9}\left (d x +c \right )\right ) a \,b^{3}}{9 d}+\frac {b^{4} \left (\tan ^{15}\left (d x +c \right )\right )}{15 d}-\frac {\left (\tan ^{5}\left (d x +c \right )\right ) b^{4}}{5 d}+\frac {4 \left (\tan ^{3}\left (d x +c \right )\right ) a \,b^{3}}{3 d}+\frac {4 \left (\tan ^{3}\left (d x +c \right )\right ) a^{3} b}{3 d}-\frac {4 \left (\tan ^{5}\left (d x +c \right )\right ) a \,b^{3}}{5 d}+\frac {4 \arctan \left (\tan \left (d x +c \right )\right ) a^{3} b}{d}+\frac {4 \arctan \left (\tan \left (d x +c \right )\right ) a \,b^{3}}{d}+\frac {6 \arctan \left (\tan \left (d x +c \right )\right ) a^{2} b^{2}}{d}-\frac {4 a^{3} b \tan \left (d x +c \right )}{d}+\frac {b^{4} \left (\tan ^{11}\left (d x +c \right )\right )}{11 d}+\frac {b^{4} \left (\tan ^{7}\left (d x +c \right )\right )}{7 d}-\frac {b^{4} \tan \left (d x +c \right )}{d}+\frac {\arctan \left (\tan \left (d x +c \right )\right ) a^{4}}{d}+\frac {\arctan \left (\tan \left (d x +c \right )\right ) b^{4}}{d}-\frac {b^{4} \left (\tan ^{13}\left (d x +c \right )\right )}{13 d}+\frac {b^{4} \left (\tan ^{3}\left (d x +c \right )\right )}{3 d}-\frac {6 a^{2} b^{2} \tan \left (d x +c \right )}{d}-\frac {4 a \,b^{3} \tan \left (d x +c \right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.79, size = 265, normalized size = 1.23 \[ a^{4} x + \frac {4 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, d x + 3 \, c - 3 \, \tan \left (d x + c\right )\right )} a^{3} b}{3 \, d} + \frac {2 \, {\left (15 \, \tan \left (d x + c\right )^{7} - 21 \, \tan \left (d x + c\right )^{5} + 35 \, \tan \left (d x + c\right )^{3} + 105 \, d x + 105 \, c - 105 \, \tan \left (d x + c\right )\right )} a^{2} b^{2}}{35 \, d} + \frac {4 \, {\left (315 \, \tan \left (d x + c\right )^{11} - 385 \, \tan \left (d x + c\right )^{9} + 495 \, \tan \left (d x + c\right )^{7} - 693 \, \tan \left (d x + c\right )^{5} + 1155 \, \tan \left (d x + c\right )^{3} + 3465 \, d x + 3465 \, c - 3465 \, \tan \left (d x + c\right )\right )} a b^{3}}{3465 \, d} + \frac {{\left (3003 \, \tan \left (d x + c\right )^{15} - 3465 \, \tan \left (d x + c\right )^{13} + 4095 \, \tan \left (d x + c\right )^{11} - 5005 \, \tan \left (d x + c\right )^{9} + 6435 \, \tan \left (d x + c\right )^{7} - 9009 \, \tan \left (d x + c\right )^{5} + 15015 \, \tan \left (d x + c\right )^{3} + 45045 \, d x + 45045 \, c - 45045 \, \tan \left (d x + c\right )\right )} b^{4}}{45045 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 11.59, size = 271, normalized size = 1.25 \[ \frac {{\mathrm {tan}\left (c+d\,x\right )}^3\,\left (\frac {4\,a^3\,b}{3}+2\,a^2\,b^2+\frac {4\,a\,b^3}{3}+\frac {b^4}{3}\right )}{d}+\frac {\mathrm {atan}\left (\frac {\mathrm {tan}\left (c+d\,x\right )\,{\left (a+b\right )}^4}{a^4+4\,a^3\,b+6\,a^2\,b^2+4\,a\,b^3+b^4}\right )\,{\left (a+b\right )}^4}{d}-\frac {\mathrm {tan}\left (c+d\,x\right )\,\left (4\,a^3\,b+6\,a^2\,b^2+4\,a\,b^3+b^4\right )}{d}-\frac {b^4\,{\mathrm {tan}\left (c+d\,x\right )}^{13}}{13\,d}+\frac {b^4\,{\mathrm {tan}\left (c+d\,x\right )}^{15}}{15\,d}-\frac {{\mathrm {tan}\left (c+d\,x\right )}^5\,\left (\frac {6\,a^2\,b^2}{5}+\frac {4\,a\,b^3}{5}+\frac {b^4}{5}\right )}{d}+\frac {{\mathrm {tan}\left (c+d\,x\right )}^7\,\left (\frac {6\,a^2\,b^2}{7}+\frac {4\,a\,b^3}{7}+\frac {b^4}{7}\right )}{d}-\frac {{\mathrm {tan}\left (c+d\,x\right )}^9\,\left (\frac {b^4}{9}+\frac {4\,a\,b^3}{9}\right )}{d}+\frac {{\mathrm {tan}\left (c+d\,x\right )}^{11}\,\left (\frac {b^4}{11}+\frac {4\,a\,b^3}{11}\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 7.07, size = 386, normalized size = 1.79 \[ \begin {cases} a^{4} x + 4 a^{3} b x + \frac {4 a^{3} b \tan ^{3}{\left (c + d x \right )}}{3 d} - \frac {4 a^{3} b \tan {\left (c + d x \right )}}{d} + 6 a^{2} b^{2} x + \frac {6 a^{2} b^{2} \tan ^{7}{\left (c + d x \right )}}{7 d} - \frac {6 a^{2} b^{2} \tan ^{5}{\left (c + d x \right )}}{5 d} + \frac {2 a^{2} b^{2} \tan ^{3}{\left (c + d x \right )}}{d} - \frac {6 a^{2} b^{2} \tan {\left (c + d x \right )}}{d} + 4 a b^{3} x + \frac {4 a b^{3} \tan ^{11}{\left (c + d x \right )}}{11 d} - \frac {4 a b^{3} \tan ^{9}{\left (c + d x \right )}}{9 d} + \frac {4 a b^{3} \tan ^{7}{\left (c + d x \right )}}{7 d} - \frac {4 a b^{3} \tan ^{5}{\left (c + d x \right )}}{5 d} + \frac {4 a b^{3} \tan ^{3}{\left (c + d x \right )}}{3 d} - \frac {4 a b^{3} \tan {\left (c + d x \right )}}{d} + b^{4} x + \frac {b^{4} \tan ^{15}{\left (c + d x \right )}}{15 d} - \frac {b^{4} \tan ^{13}{\left (c + d x \right )}}{13 d} + \frac {b^{4} \tan ^{11}{\left (c + d x \right )}}{11 d} - \frac {b^{4} \tan ^{9}{\left (c + d x \right )}}{9 d} + \frac {b^{4} \tan ^{7}{\left (c + d x \right )}}{7 d} - \frac {b^{4} \tan ^{5}{\left (c + d x \right )}}{5 d} + \frac {b^{4} \tan ^{3}{\left (c + d x \right )}}{3 d} - \frac {b^{4} \tan {\left (c + d x \right )}}{d} & \text {for}\: d \neq 0 \\x \left (a + b \tan ^{4}{\relax (c )}\right )^{4} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________